package com.ruoyi.common.core.utils;

import java.math.BigDecimal;
import java.math.RoundingMode;

public class BigDecimalUtils {

    public static BigDecimal multiply(BigDecimal arg0,Integer arg1){
        return arg0.multiply(BigDecimal.valueOf(arg1));
    }

    public static BigDecimal divide(BigDecimal arg0,String arg1){
        return arg0.divide(new BigDecimal(arg1), 2,RoundingMode.HALF_UP);
    }

    /**
     * arg0是否大于arg1
     */
    public static boolean gt(BigDecimal arg0,BigDecimal arg1){
        return arg0.compareTo(arg1)>0;
    }
}
